Skip to content

Add C# highlighting - #856

Closed
licon4812 wants to merge 5 commits into
microsoft:mainfrom
licon4812:syntax-highlighting/csharp
Closed

Add C# highlighting#856
licon4812 wants to merge 5 commits into
microsoft:mainfrom
licon4812:syntax-highlighting/csharp

Conversation

@licon4812

@licon4812 licon4812 commented May 7, 2026

Copy link
Copy Markdown
Contributor

This pull request adds initial support for C# syntax highlighting by introducing a new C# language definition and an associated test file. It also updates the highlighting engine to treat C# preprocessor directives with a specific highlight color.

C# syntax highlighting support:

  • Added a new C# language definition in csharp.lsh, covering preprocessor directives, comments, various string and character literal forms, attributes, keywords, numeric literals, and method names.
  • Introduced a comprehensive C# test file (csharp.cs) to validate the new syntax highlighting rules.

Highlighting engine improvements:

  • Updated the buffer implementation to highlight C# preprocessor directives (meta.preprocessor) using the BrightBlue color.
Screenshot image

@lhecker lhecker changed the title feat: Added csharp syntax highlighting Add C# highlighting Jul 22, 2026
lhecker added a commit to CringeCronge/edit that referenced this pull request Jul 29, 2026
@lhecker

lhecker commented Jul 29, 2026

Copy link
Copy Markdown
Member

I merged your changes into #802 and merged it into main just now. I've attributed you appropriately. Thanks!

@lhecker lhecker closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants